home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Internet Chooser
/
reggie
/
basic
/
store.h
< prev
Wrap
Text File
|
1996-06-22
|
2KB
|
57 lines
/* File "store.h", AvaraTracker - Copyright (C) Matt Slot, 1996 */
#ifndef __STORE_HEADER__
#define __STORE_HEADER__
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* Include Files */
#include "stdtypes.h"
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* Preprocessor Defines */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* Structure/Class Declarations */
typedef class c_store {
public:
c_store (UInt32 elem_size);
~c_store (void);
/* Administrative functions */
SInt32 insert_elem (Byte8 *new_data, UInt32 before_elem=0);
SInt32 append_elem (Byte8 *new_data)
{ return(insert_elem(new_data, count)); }
SInt32 remove_elem (UInt32 index);
SInt32 remove_all (void);
UInt32 count_elems (void) { return(count); }
Byte8 * get_nth_elem (UInt32 index);
private:
UInt32 size; /* Element Size */
UInt32 count; /* Element Count */
Byte8 * data_ptr;
} c_store;
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* Function Prototypes */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
/* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
#endif /* __STORE_HEADER__ */